package com.jiaai.member.api;

import com.alibaba.fastjson.JSONObject;
import com.jiaai.exception.ServerException;
import com.jiaai.member.model.BMember;
import com.jiaai.member.model.EditMemVO;
import com.jiaai.member.model.MemberQueryVO;
import com.jiaai.member.model.MemberSearch;
import com.jiaai.util.geograph.LocationBean;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * TODO
 * </p>
 *
 * @author 佳爱网络科技
 * @version V1.0
 * @title IMemberApi
 * @since 2017/10/9
 */
public interface IMemberApi {

    /**
     * 注册同时也进行登录
     * @param params
     * @return
     * @throws ServerException
     */
    Object register(Map<String,Object>   params)throws ServerException;


    /**
     * 修改个人资料
     * @param params
     * @return
     * @throws ServerException
     */
    void modifyUserData(Map<String,Object> params) throws ServerException;







    /**
     * 获取用户祥情
     * @param mId
     * @return
     * @throws ServerException
     */
    Map<String,Object> findMemberInfoById(String mId)throws  ServerException;


    /**
     * 查找主播
     * @param search
     * @return
     * @throws ServerException
     */
    List< Map<String,Object>> search(MemberSearch search)throws  ServerException;

    /**
     * 手机方式登录
     * @param phone
     * @return
     */
    Object phoneLogin(String phone);
    /**
     * 密码登录
     * @return
     */
    Object loginPwd(String phone, String pwd)throws  ServerException;

    /**
     * 检查是否已注册
     * @param mobile
     * @return
     */
    Boolean checkMobile(String mobile);

    /**
     * 绑定微信
     * @param mId
     * @param jsonObject
     */
    void saveWXUnionId(String mId, JSONObject jsonObject);

    /**
     * 微信登录
     * @param openId
     * @return
     */
    Object wxLogin(String openId);

    /**
     * 重置密码
     * @param phone
     * @param pwd
     */
    void resetPwd(String phone, String pwd);

    boolean editInfo(EditMemVO memVO);

    /**
     * 注销
     * @param memberId
     */
    void loginOut(String memberId);

    /**
     * 获取我的关注列表
     * @param mId
     * @return
     */
    Object getFollowingAnchors(Integer curr, String mId);




    
    /**
     * 查询用户钻石贡献排行榜
     * @param type total today week
     * @param mId 传入则查询指定用户的钻石贡献排行榜
     * @return
     */
    public List<Map<String,Object>> findDimonsRankingByAll(String type,String mId);


    /**
     * 获取用户关注数据
     * @param mId
     * @return
     */
    public  List<Map> getUserFollow(String mId);


    /**
     * 获取用户粉丝
     * @param mId
     * @return
     */
    public  List<Map> getUserFans(String mId);

    /**
     * 获取用户守护信息
     * @param mId
     * @return
     */
    public  List<Map> getUserGuard(String mId);

    public  Map<String,Object> lookMemberInfo(String mId);


    /*
    ======================================后台====================================
     */
    /**
     * 到处excel
     * @param vo
     * @return
     */
    Object getAllExcl(MemberQueryVO vo) throws Exception;
    /**
     * 列表
     * @param curr
     * @return
     */
    Object backMemberList(Integer curr, MemberQueryVO vo);

    /**
     * 改变会员状态
     * @param mId
     * @param status
     */
    void changeStatus(String mId, Integer status);

    /**
     *获取半个月的会员新增数量
     *
     *
     */
    Object tongJiNewMember();
    /**
     *获取渠道新增数量
     *
     *
     */
    Object tongJiNewChannel();

    void udpateLocation(String mId, LocationBean locationBean);

    Object payHisAll(Integer curr, String mId, String nickName,String mobile);

    void changeInfo(BMember bMember) throws Exception;

    void changeSpeakStatus(String mId, Integer speakStatus);


    void editMember(BMember bMember) throws Exception;

    void delete(String  mId) throws Exception;




}
